<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>一般积分管理</title>
<link rel="stylesheet" href="__CSS__/pintuer.css?v={$src_version}">
<link rel="stylesheet" href="__CSS__/admin.css?v={$src_version}">
<link rel="stylesheet" href="__CSS__/responsive.css?v={$src_version}">
<script src="__JS__/jquery-3.2.1.min.js?v={$src_version}"></script>
<script src="__JS__/pintuer.js?v={$src_version}"></script>
<script src="__JS__/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/layer.js?v={$src_version}"></script>
<script src="__JS__/ming.js?v={$src_version}"></script>
<script src="__JS__/responsive.js?v={$src_version}"></script>
</head>
<body>
	<div  class="panel admin-panel">
		<a class="button border-yellow" href="{:U('Number/add')}">
			<span class="icon-plus-square-o"></span>添加项目</a>
		<table class="table table-hover text-center">
			<tr>
				<th>编号</th>
				<th>项目名称</th>
				<th>项目类型</th>
				<th>加/减分数</th>
				<th>修改操作</th>
			</tr>
			<volist name="list" id="vo" key="i">
				<tr>
					<td>{$i}</td>
					<td>{$vo.pname}</td>
					<td><if condition="$vo.opt eq '+'">加分项目<else/>减分项目</if></td>
					<td>{$vo.point}</td>
					<td>
						<a class="button border-main" href="{:U('Number/edit',array('id'=>$vo['pid']))}">
							<span class="icon-edit"></span>修改
						</a>
						<a class="button border-red del" href="javascript:;" data-href="{:U('Number/del',array('id'=>$vo['pid']))}">
							<span class="icon-trash-o"></span>删除
						</a>
					</td>
				</tr>
			</volist>
		</table>
	</div>
</body>

	<script>
		$(document).ready(function(){
			$('.del').click(function(){
				var url = $(this).data('href');
				if(confirm('确认删除')){
					$.get(url,function(data){
						alert('删除成功');
						location.reload();
					});
				}
			});
		});
	</script>

</html>